﻿using System.Data.Entity;

namespace Eleven.GettingStarted.EfConsole
{
    class VetContext : DbContext
    {
        public DbSet<Visit> Visits { get; set; }
        public DbSet<Patient> Patients { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<AnimalType>().Property(a => a.Name).IsRequired();
        }
    }
}